<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*"
	contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>代码生成器</title>
<LINK href="/css/template.css" type=text/css rel=stylesheet>
<script language="javascript" src="/js/validate.js"></script>
<script language="javascript" src="/js/check/template.js"></script>

<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<body>
<span class="red left10">当前位置：</span>系统管理 &gt; 生成action类和struts配置模板文件<br/>
<span class="navtitle">生成action类和struts配置模板文件</span>
<br />

<!--<FORM name="Form1" action="<%=basePath%>template/createTemplate.action" method="post" >-->
<s:form action="createTemplate">
  <table width="95%"  border="0" cellpadding="2" cellspacing="1" class="left bgcolor">
  <tr class="tablewhite">
      <td colspan="2" align="right">	  <div align="center">选择需要生成的文件 <input type="checkbox" checked="checked"value="1" name="ids">Action  <input type="checkbox" checked="checked"value="2" name="ids">
          struts xml配置文件  
              <input type="checkbox" checked="checked" value="3" name="ids">
          Service接口  
          <input type="checkbox" checked="checked"value="4" name="ids">
          Dao接口  
          <input type="checkbox" checked="checked"value="5" name="ids">
          Service实现类 
          <input  type="checkbox"value="6" checked="checked"  name="ids"/>
Dao实现类 
<input type="checkbox" value="7" checked="checked"  name="ids"/>
sqlmap xml<br><input type="checkbox" value="8"   name="ids"/>
生成后台jsp添加页面<input type="checkbox" value="9"   name="ids"/>
生成后台jsp修改页面<input type="checkbox" value="10"   name="ids"/>
生成后台jsp列表页面<input type="checkbox" value="11" checked="checked"  name="ids"/>
daoBean.xml</div></td>
    </tr>
  <tr class="title_tr">
      <td colspan="2" align="right">	  <div align="center">action模板参数</div></td>
    </tr>
	<tr class="tablewhite"> 
      <td width="174" align="right">包路径<span class="STYLE1">(必填)</span>：</td>
      <td width="724"><input maxlength="50" size="50" value="com.action" name="template.packagePath" id="packagePath" /> 
        <span class="left gray"> *<span class="STYLE1">默认 com.action</span>  如：com.action</span></td>
  </tr>
	<tr class="tablewhite"> 
      <td width="174" align="right">类功能描述<span class="STYLE1">(必填)</span>：</td>
      <td width="724"><input maxlength="50" size="50" value="${template.description}" name="template.description" id="description" /> 
        <span class="left gray"> * 如：该action用来操作省份的 </span></td>
  </tr>
  <tr class="tablewhite"> 
      <td width="174" align="right">类名：</td>
      <td width="724"><input maxlength="50" size="30" value="${template.className}" name="template.className" id="className" /> 
        <span class="left gray"> *<span class="STYLE1">默认 Bean对象名Action 首字母大写 </span> 如：ProvinceAction </span></td>
  </tr>
  <tr class="tablewhite"> 
      <td width="174" align="right">List对象名：</td>
      <td><input maxlength="50" size="30" value="${template.listname}" name="template.listname" id="listname" />
        <span class="left gray">*<span class="STYLE1">默认 Bean对象名List</span> 如：provinceList</span></td>
  </tr>
  <!--
  <tr class="tablewhite"> 
      <td width="174" align="right">Bean名：</td>
      <td><input maxlength="50" size="30" value="${template.beanName}" name="template.beanName" id="beanName" />
        <span class="left gray">* 如：Province 删除掉</span></td>
  </tr>
-->
<tr class="tablewhite"> 
      <td width="174" align="right">Bean对象名<span class="STYLE1">(必填)</span>：</td>
      <td>
      <select id="beanlist" name="beanlist" onchange="javascript:;document.getElementById('objectName').value=this.value">
      	<option value="">请选择bean名称</option>
      	<s:iterator value="beanList" id="object">
      		<option value="${object}">${object}</option>
      	</s:iterator>
      </select>
      <input maxlength="50" size="30" value="${template.objectName}" name="template.objectName" id="objectName" />
        <span class="left gray">* 如：province </span></td>
  </tr>
  <tr class="tablewhite"> 
      <td width="174" align="right">数据库表名：</td>
      <td><input maxlength="50" size="30" value="${template.tableName}" name="template.tableName" id="tableName" />
        <span class="left gray">* <span class="STYLE1">默认 tbl_Bean对象名</span> 如：tbl_province  &nbsp;用于生成sqlmap xml配置文件</span></td>
  </tr>
  <tr class="title_tr">
      <td colspan="2" align="right">	  <div align="center">struts配置文件模板参数</div></td>
    </tr>
	<tr class="tablewhite"> 
      <td width="174" align="right">struts xml配置名称：</td>
      <td><input maxlength="50" size="30" value="${template.xmlname}" name="template.xmlname" id="xmlname" />
        <span class="left gray">* <span class="STYLE1">默认 Bean对象名.xml </span> 如：province.xml </span></td>
  </tr>
	<tr class="tablewhite"> 
      <td width="174" align="right">namespace：</td>
      <td><input maxlength="50" size="30" value="${template.namespace}" name="template.namespace" id="namespace" />
        <span class="left gray">* <span class="STYLE1">默认 Bean对象名</span> 如：/manage/province </span></td>
  </tr>
  <tr class="tablewhite"> 
      <td width="174" align="right">name：</td>
      <td><input maxlength="50" size="30" value="${template.name}" name="template.name" id="name" />
        <span class="left gray">* <span class="STYLE1">默认 Bean对象名 </span>如：manage.province </span></td>
  </tr>
  <tr class="tablewhite"> 
      <td width="174" align="right">actionname：</td>
      <td><input maxlength="50" size="30" value="${template.actionname}" name="template.actionname" id="actionname" />
        <span class="left gray">* <span class="STYLE1">默认 Bean对象名Action  首字母大写</span> 如：ProvinceAction </span></td>
  </tr>
  <tr class="tablewhite"> 
      <td width="174" align="right">classpath：</td>
      <td><input maxlength="80" size="60" value="" name="template.classpath" id="classpath" /><br>
        <span class="left"><span class="STYLE1">默认 Bean对象名action </span>* 如：loginaction   记住配置spring的xml配置文件 </span></td>
  </tr>
  <!--
  <tr class="tablewhite"> 
      <td width="174" align="right">jspname：</td>
      <td><input maxlength="50" size="30" value="${template.jspname}" name="template.jspname" id="jspname" />
        <span class="left gray">* 如：province </span></td>
  </tr>
  -->
  <tr class="tablewhite"> 
      <td width="174" align="right">extends：</td>
      <td><input maxlength="50" size="30" value="${template.extendsPackage}" name="template.extendsPackage" id="extendsPackage" />
        <span class="left gray">* 如：<span class="STYLE1">默认 struts-default</span> (不带权限)  ,  struts-base (带权限)</span></td>
  </tr>
  </table>

<div align="center"><br/>
  <INPUT class=buttonpop style="WIDTH: 240px"  type=submit value=" 填好了，生产模板action和struts配置文件！ " name=submit1>
  &nbsp;&nbsp;
  <input name="reset" type="reset" class="buttonpop" value="重置" />
  &nbsp;&nbsp;
  <input name="back" type="button" class="buttonpop" value="返回" onclick="javascript:;history.go(-1);"/>

</div>
</s:form>
<span class="red left">说明：</span><br/>
<span class="left gray">· * 都必填 </span><BR>
<br>
<br>
</body>
</html>